package com.demo.fieldbind;

import cn.lingyangwl.framework.data.mate.fieldbind.inter.IFieldBindAnnotationDataGetter;
import cn.lingyangwl.framework.data.mate.fieldbind.model.AnnotationMetadata;
import org.springframework.stereotype.Component;

/**
 * 自定义注解数据getter
 */
@Component
public class CustomAnnoDataGetterBind implements IFieldBindAnnotationDataGetter<CustomFieldBind> {

    @Override
    public AnnotationMetadata initFieldBindAnnotation(CustomFieldBind anno) {
        return AnnotationMetadata.builder().type(anno.type().getCode())
                .delimiter(anno.delimiter()).target(anno.target()).build();
    }
}
